import gradio as gr     # 导入gradio的库


# 定义打招呼的函数
def greet(name, intensity):
    return "你好啊！" + name + "!" * int(intensity)

# 实例化一个网页
demo = gr.Interface(
    fn=greet,
    inputs=["text", "slider"],
    outputs=["text"],
)
# 调用加载方法
demo.launch()
